#include <iostream>
#include <Windows.h>
#include "ThreadPool.hpp"

class task
{
public:
	task(int x)
		:_x(x)
	{}
	task(const task& t)
	{
		_x = t._x;
	}
	task()
		:_x(0)
	{}
	void run()
	{
		std::cout << _x << std::endl;
	}
	void operator()()
	{
		run();
	}
private:
	int _x;
};



int main()
{
	int n = 1000;
	for (int i = 0; i < n; i++)
	{
		ThreadPool::Thread<task>::GetThread(20)->push(task(i));
		Sleep(1);
	}
	Sleep(10000);
	return 0;
}